# Maintainer: Miles Alan <m@milesalan.com>
pkgname=codemadness-frontends
pkgver=0.1.2
pkgrel=0
pkgdesc="Experimental (cli, web, and gopher) frontends for youtube, reddit, & duckduckgo"
url="https://www.codemadness.org/idiotbox.html"
arch="all"
license="ISC"
makedepends="libressl-dev libtls-standalone"
options="!check" # Has no tests
source="$pkgname-$pkgver.tar.gz::https://codemadness.org/releases/frontends/frontends-$pkgver.tar.gz"
builddir="$srcdir/frontends-$pkgver"

prepare() {
	sed -i 's/^#FRONTENDS_/FRONTENDS_/g' Makefile
	sed -i 's/^#LIBTLS_/LIBTLS_/g' Makefile
	default_prepare
}

build() {
	make
}

package() {
	install -Dm755 youtube/cgi $pkgdir/usr/bin/youtube-cgi
	install -Dm755 youtube/gopher $pkgdir/usr/bin/youtube-gopher
	install -Dm755 youtube/cli $pkgdir/usr/bin/youtube-cli

	install -Dm755 duckduckgo/gopher $pkgdir/usr/bin/duckduckgo-gopher
	install -Dm755 duckduckgo/cli $pkgdir/usr/bin/duckduckgo-cli

	install -Dm755 reddit/gopher $pkgdir/usr/bin/reddit-gopher
	install -Dm755 reddit/cli $pkgdir/usr/bin/reddit-cli
}


sha512sums="37da76e6c149ac60d89fa513b311595e2d17ccad1f1720da74ee1488715b10e2398d16f07556b390fd4f5ab7878bcc20d9ece69f0999cf6456ad73085831af3a  codemadness-frontends-0.1.2.tar.gz"
